package com.hw.paltfrom.controller.casemain;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hw.paltfrom.pack.ResponseResult;
import com.hw.paltfrom.rescode.HWSystemCode;
import com.hw.paltfrom.service.casemain.PoliceCasemainServer;
import com.hw.paltfrom.utils.VerifyUtil;
import com.hw.paltfrom.vo.PoliceCasemainFileVo;
import com.hw.paltfrom.vo.PoliceCasemainVo;

@RestController
@RequestMapping(value = "/PoliceCasemain")
public class PoliceCasemainController {

	@Autowired
	private PoliceCasemainServer server;

	@RequestMapping(value = "/query")
	public Map<String, Object> standQuery(PoliceCasemainVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return server.query(vo);
	}

	@RequestMapping(value = "/handle")
	public Map<String, Object> handle(@RequestBody PoliceCasemainFileVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return server.handle(vo);
	}
	
	@RequestMapping(value = "/onlyQuery")
	public Map<String, Object> onlyQuery(PoliceCasemainVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return server.onlyQuery(vo);
	}
	
	@RequestMapping(value = "/export")
	public Map<String, Object> export(PoliceCasemainVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return server.Export(vo);
	}
	
	
}
